﻿<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>计划排产</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <!--responsive-->
    <link rel="shortcut icon" href="../Content/img/jridge.ico" />
    <link rel="bookmark" href="../Content/img/jridge.ico" />
    <script src="../Scripts/jquery-1.10.2.min.js"></script>
    <script src="../Scripts/clipboard-polyfill.js"></script>
    <!--公共样式-->
    <link rel="stylesheet" href="./content/index.css">
    <!--vue-->
    <script src="../Scripts/vue-2.5.9/vue.min.js"></script>
    <!--axios-->
    <script src="../Scripts/vue-2.5.9/axios.min.js"></script>
    <!--elementUI-->
    <script src="./Scripts/elementUI-2.4.0/index.js"></script>
    <link rel="stylesheet" href="./Scripts/elementUI-2.4.0/theme-chalk/index.css">
    <!--custom-->
    <link rel="stylesheet" href="../Content/vue-common.css">
    <script src="./Scripts/vue-service-school.js"></script>
    <script src="../Scripts/service/vue-service.js"></script>
    <style>
        .el-table .cell {
            word-break: normal
        }

        .startActive {
            background-color: #F0F9EB
        }

        .endActive {
            background-color: #FDF5E6
        }
    </style>
</head>

<body id="body">
    <div id="app">
        <header-bar :pagename="pagename" :userinfo="userinfo"></header-bar>
        <el-row>
            <el-col :span="3">
                <side-bar></side-bar>
            </el-col>
            <el-col :span="21">
                <div id="container">
                    <el-row style="margin-top:10px;font-size:14px">
                        <el-col :span="15" :offset="1">
                            <span style="font-family:'幼圆'">当前订单：</span>
                            <el-select v-model="selectedOrderID" placeholder="请选择一个订单排产" size="small" @change="selectOrder()">
                                <el-option v-for="item in orderData" :key="item.id" :label="item.properties.name" :value="item.id">
                                    <span style="float: left">{{ item.properties.orderno }}</span>
                                    <span style="float: right; color: #8492a6; font-size: 13px">{{ item.properties.name }}</span>
                                </el-option>
                            </el-select>
                            <el-button type="primary" size="small" round @click="startAPS()" :loading="loading_apsschedule">
                                <i class="el-icon-date" style="margin-right:10px"></i>开始排产
                            </el-button>
                        </el-col>
                        <el-col :span="7">
                            <el-button style="float:right;" type="success" icon="el-icon-check" size="small" @click="releaseAPS()" :loading="loading_apsrelease">
                                计划下发</el-button>
                            </el-button>
                            <!-- <span style="float:right;font-size:14px;color:#8492a6;margin:10px 10px auto auto">当前订单号：{{selectedOrderNo}}</span> -->
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-table id="table" :data="MBomDefined" style="width: 96%;margin-left:3%" border :max-height="mainTable_maxHeight" v-loading="loading" element-loading-text="拼命加载中"
                            element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.8)" :fit="true"
                            stripe>
                            <el-table-column type="index" label="序号" align="center">
                            </el-table-column>
                            <el-table-column prop="materialno" label="物料编码" sortable align="center">
                            </el-table-column>
                            <el-table-column prop="identityno" label="图号" sortable align="center">
                            </el-table-column>
                            <el-table-column prop="name" label="名称" sortable align="center">
                            </el-table-column>
                            <el-table-column prop="indexno" label="工序号" sortable align="center">
                            </el-table-column>
                            <el-table-column prop="qcpname" label="工序名称" sortable align="center">
                            </el-table-column>
                            <el-table-column label="开工时间" sortable align="center">
                                <template scope="scope">
                                    <span v-bind:class="{startActive: (scope.row.startdate !=='')}">{{scope.row.startdate}}</span>
                                </template>
                            </el-table-column>
                            <el-table-column label="完工时间" sortable align="center">
                                <template scope="scope">
                                    <span v-bind:class="{endActive: (scope.row.enddate !=='')}">{{scope.row.enddate}}</span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="orderquantity" label="生产数量" style="text-align:center" sortable align="center">
                            </el-table-column>
                            <el-table-column prop="assemblyunit" label="单位" align="center">
                            </el-table-column>
                        </el-table>
                    </el-row>
                </div>
            </el-col>
        </el-row>



    </div>
    <script>
        $('#body').css('height', $(window).height());
        $('#container').css('height', $(window).height() - 80);
    </script>
    <script src="teamPlan.js"></script>
    <script src="./Template/vue-components.js"></script>
</body>

</html>